const { mysql } = require('../qcloud')

module.exports = async (ctx, next) => {
  var openId = ctx.request.body.openId;
  var id = ctx.request.body.id;
  var nickName = ctx.request.body.nickName;
  var bookStatus = ctx.request.body.bookStatus;
  await mysql('book').update({ getOpenId: openId }).update({ 
    getNickName: nickName }).update({ 
      bookStatus: bookStatus }).where({
        id: id }).then(res => {
    ctx.state.data = res;
  })
}
